home *** CD-ROM | disk | FTP | other *** search
- /* GadTools layout toolkit
- **
- ** Copyright © 1993-1995 by Olaf `Olsen' Barthel
- ** Freely distributable.
- */
-
- #include "gtlayout_global.h"
-
- #ifdef DO_TAPEDECK_KIND
- VOID __regargs
- LTP_DrawBackFore(struct RastPort *RPort,BOOLEAN Back,LONG Left,LONG Top,LONG Width,LONG Height)
- {
- LONG i,Len,Start,ArrowWidth,ArrowHeight,Shift;
-
- ArrowWidth = Width / 2;
- ArrowHeight = Height;
- Left = Left + (Width - ArrowWidth) / 2;
- Shift = ArrowWidth / 2;
-
- if(Back)
- {
- for(i = 0 ; i < ArrowWidth ; i++)
- {
- Len = ((ArrowHeight * (i + 1)) / ArrowWidth) & ~1;
-
- if(Len < ArrowHeight)
- Len++;
-
- Start = Top + (ArrowHeight - Len) / 2;
-
- Move(RPort,Left + i - Shift,Start);
- Draw(RPort,Left + i - Shift,Start + Len - 1);
-
- Move(RPort,Left + i + Shift,Start);
- Draw(RPort,Left + i + Shift,Start + Len - 1);
- }
- }
- else
- {
- for(i = 0 ; i < ArrowWidth ; i++)
- {
- Len = ((ArrowHeight * (i + 1)) / ArrowWidth) & ~1;
-
- if(Len < ArrowHeight)
- Len++;
-
- Start = Top + (ArrowHeight - Len) / 2;
-
- Move(RPort,Left + ArrowWidth - 1 - i - Shift,Start);
- Draw(RPort,Left + ArrowWidth - 1 - i - Shift,Start + Len - 1);
-
- Move(RPort,Left + ArrowWidth - 1 - i + Shift,Start);
- Draw(RPort,Left + ArrowWidth - 1 - i + Shift,Start + Len - 1);
- }
- }
- }
- #endif /* DO_TAPEDECK_KIND */
-